<sel:test name="Role CRUD test">

 <sel:row line="open|${request.contextPath}/role"/>
 <sel:row line="verifyTextPresent|Home"/>

 <sel:row line="verifyTextPresent|Role List"/>
 <sel:row line="verifyXpathCount|xpath=(//div[@class='list']//tbody/tr)|0"/>

 <sel:row line="clickAndWait|link=New Role"/>
 <sel:row line="verifyTextPresent|Create Role"/>
 <sel:row command="type" target="name" value="new role"/>
 <sel:row line="clickAndWait|//input[@value='Create']"/>
 <sel:row line="verifyTextPresent|Show Role"/>
 <sel:row line="clickAndWait|link=Role List"/>

 <sel:row line="verifyTextPresent|Role List"/>
 <sel:row line="verifyXpathCount|xpath=(//div[@class='list']//tbody/tr)|1"/>

 <sel:row line="clickAndWait|link=1"/>
 <sel:row line="clickAndWait|//input[@value='Edit']"/>

 <sel:row line="verifyTextPresent|Edit Role"/>
 <sel:row line="clickAndWait|//input[@value='Update']"/>
 <sel:row line="verifyTextPresent|Show Role"/>
 <sel:row line="clickAndWait|link=Role List"/>

 <sel:row line="verifyTextPresent|Role List"/>
 <sel:row line="verifyXpathCount|xpath=(//div[@class='list']//tbody/tr)|1"/>

 <sel:row line="clickAndWait|link=1"/>
 <sel:row line="clickAndWait|//input[@value='Delete']"/>
 <sel:row line="verifyConfirmation|Are you sure?"/>

 <sel:row line="verifyTextPresent|Role List"/>
 <sel:row line="verifyXpathCount|xpath=(//div[@class='list']//tbody/tr)|0"/>
</sel:test>
